package com.controller.student;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.po.SmessageH;
import com.service.student.SmessageServiceH;

@Controller
public class SmessageControllerH {
	
	@Resource(name="smessageServiceImpH")
	private SmessageServiceH smessageservice;
	
	@ResponseBody
	@RequestMapping(value="/getMessageListH")
	public List<SmessageH> getMessageList(){
		
		return (List<SmessageH>) smessageservice.getMessageList();
	}
	
	@ResponseBody
	@RequestMapping(value="/addMessageH")
	public int addMessage(@RequestBody SmessageH message){
		
		return smessageservice.addMessage(message);
	}
	
}
